#！/bin/sh

#data_date=$1

add_sql="
alter table jtp_Work_shucang.ods_user_behavior_log add if not exists partition (dt = '${data_date}');
alter table jtp_Work_shucang.ods_order_detail add if not exists partition (dt = '${data_date}');
alter table jtp_Work_shucang.ods_product_info add if not exists partition (dt = '${data_date}');
alter table jtp_Work_shucang.ods_payment add if not exists partition (dt = '${data_date}');
alter table jtp_Work_shucang.ods_refund_record add if not exists partition (dt = '${data_date}');
"



/opt/module/spark/bin/beeline -u jdbc:hive2://node101:10001 -n bwie -e "${add_sql}"